package com.whfc.fmam.service;

import com.whfc.common.exception.BizException;
import com.whfc.common.result.ListData;
import com.whfc.common.result.PageData;
import com.whfc.fmam.entity.dto.*;

import java.util.Date;
import java.util.List;

/**
 * @Description: 同步数据service
 * @author: xugcheng
 * @version: 1.0
 * @date: 2019/10/16 11:58
 */
public interface FmamSyncDataService {

    /**
     * 同步供应商
     *
     * @param fmamClientDTO
     * @param lastSyncTime
     * @return
     */
    ListData<SyncFmamSupplierDTO> getSyncSupplierDTO(FmamClientDTO fmamClientDTO, Date lastSyncTime) throws BizException;

    /**
     * 同步仓库
     *
     * @param fmamClientDTO
     * @param lastSyncTime
     * @return
     */
    ListData<SyncFmamWarehouseDTO> getSyncWarehoureDTO(FmamClientDTO fmamClientDTO, Date lastSyncTime) throws BizException;

    /**
     * 同步材料类别
     *
     * @param fmamClientDTO
     * @param lastSyncTime
     * @param pageNum
     * @param pageSize
     * @return
     */
    PageData<SyncFmamMatTypeDTO> getSyncMatTypeDTO(FmamClientDTO fmamClientDTO, Date lastSyncTime, Integer pageNum, Integer pageSize) throws BizException;

    /**
     * 同步材料
     *
     * @param fmamClientDTO
     * @param lastSyncTime
     * @param pageNum
     * @param pageSize
     * @return
     */
    PageData<SyncFmamMatDTO> getSyncMatDTO(FmamClientDTO fmamClientDTO, Date lastSyncTime, Integer pageNum, Integer pageSize) throws BizException;

    /**
     * 上传磅单
     *
     * @param fmamClientDTO
     * @param uploadWeighNoteDTO
     */
    void uploadWeighNote(FmamClientDTO fmamClientDTO, UploadWeighNoteDTO uploadWeighNoteDTO) throws BizException;

    /**
     * 上传磅单图片
     *  @param fmamClientDTO
     * @param guid
     * @param imgType
     * @param type
     * @param imgUrl
     * @param genType
     * @param genTime
     */
    void uploadWeighNoteImage(FmamClientDTO fmamClientDTO, String guid, Integer imgType, Integer type, List<String> imgUrl, Integer genType, Date genTime) throws BizException;

    /**
     * 获取下传磅单
     *
     * @param fmamClientDTO
     * @param lastSyncTime
     * @param pageNum
     * @param pageSize
     * @return
     */
    PageData<SyncFmamWeighNoteDTO> getSyncWeighNoteDTO(FmamClientDTO fmamClientDTO, Date lastSyncTime, Integer pageNum, Integer pageSize) throws BizException;

    /**
     * 同步材料计量单位
     *
     * @return
     */
    ListData<SyncFmamUnitDTO> getSyncUnitDTO() throws BizException;
}
